#include "Engine.h"
//#include "Renderer.h"
#include "Window.h"


Engine::Engine(unsigned int uiWidth, unsigned int uiHeight, HINSTANCE hInstance) 
:
hInstance(hInstance),
uiWidth(uiWidth),
uiHeight(uiHeight),
window(new Window() )
//renderer(new Renderer() )
{
	
}
Engine::~Engine(){

	//delete renderer;
//	renderer  = NULL;
	delete window;
	window  = NULL;
}

bool Engine::init(){

	if(!window->createWindow(uiWidth, uiHeight, hInstance))
		return false;
}

void Engine::run(){

	bool bDone = false;
	MSG kMsg;

	while(!bDone){
		
		//renderer->beginFrame();
		//renderer->endFrame();

		if(PeekMessage(&kMsg, NULL, 0, 0, PM_REMOVE))
			switch(kMsg.message)
				case WM_QUIT:
					bDone = true;
					break;

		TranslateMessage(&kMsg);
		DispatchMessage(&kMsg);
	}
}